package com.zhangtai.modules.service.salary;

import com.zhangtai.modules.entity.salary.AwardApplicantEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-08-21 11:22:15
 */

public interface AwardApplicantService {

    @GetMapping("/findAwardApplicantList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage( @RequestParam(value = "orgIds",required = false) List<Long> orgIds,
                          @RequestParam(value = "applicantName", required = false) String applicantName,
                         @RequestParam(value = "usercode", required = false) String usercode,
                         @RequestParam(value = "startTime", required = false) String startTime,
                         @RequestParam(value = "endTime", required = false) String endTime,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @GetMapping("/infoAwardApplicant")
    @ApiOperation(value = "根据id查找")
    AwardApplicantEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveAwardApplicant")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody AwardApplicantEntity entity);

    @PostMapping("/updateAwardApplicant")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody AwardApplicantEntity entity);

    @GetMapping("/deleteOneAwardApplicant")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteAwardApplicants")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

